package com.platform.enumeration;

/**
 * 注册方式
 * @author gzg
 */

public enum RegisterTypeEnum {
    /**
     * 注册方式 1：我要招商；2：我要代理
     */
    BUSINESS_IMPORTING(1, "我要招商"),
    BUSINESS_AGENT(2, "我要代理");
    private Integer type;
    private String desc;

    RegisterTypeEnum(Integer type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public static String getRegisterDescByType(Integer type) {
        for (RegisterTypeEnum typeEnum : RegisterTypeEnum.values()) {
            if (typeEnum.getType().equals(type)) {
                return typeEnum.getDesc();
            }
        }
        return null;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
